package ExperimentThree.Proxy;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author 北巷_东坡
 * @date 2022/11/13 11:21
 * @computer 10741
 */
public class LoggerProxy206 implements AbstractSubject206{
    private BisinessClass206 bisinessClass206 = new BisinessClass206();
    private SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    private String time = SDF.format(new Date());
    @Override
    public void method() {
        System.out.println("方法Method被调用，调用时间为："+time);
        try {
            bisinessClass206.method();
            System.out.println("方法method()调用成功");
        }catch (Exception e){
            System.out.println("方法method()调用失败");
        }
    }
}
